package fmse.uaic.k.configuration_abstraction.visitors;

import fmse.uaic.k.configuration_abstraction.abstract_classes.KAbstractNode;
import fmse.uaic.k.configuration_abstraction.abstract_visitor.KAbstractNodeVisitor;

public class SearchByIdVisitor extends KAbstractNodeVisitor {

	private int ID;
	private KAbstractNode node;

	public SearchByIdVisitor() {
		super();
	}

	@Override
	public void visit(KAbstractNode abstractNode) {
		if (abstractNode.getID() == ID)
			node = abstractNode;
	}

	public int getID() {
		return ID;
	}

	public void setID(int iD) {
		ID = iD;
	}

	public KAbstractNode getNode() {
		return node;
	}

	public void setNode(KAbstractNode node) {
		this.node = node;
	}

}
